package com.originskyseed.platform.recruit.mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.originskyseed.platform.recruit.model.RankingListVO;
import com.originskyseed.platform.recruit.model.Recruit;

/**
 * 招聘信息表Mapper类（OSI_RECRUIT）
 *
 * @author Tangwanghui
 */
public interface RecruitMapper {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(Recruit record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(Recruit record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(Recruit record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(Recruit record) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public Recruit selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<Recruit> selectList(Recruit record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<Recruit> selectListByPage(Map<String, Object> params) throws Exception;

	/**
	 * 查询模板是否使用
	 *
	 * @param recruitTemplateId
	 * @return
	 * @throws Exception
	 */
	public Boolean selectRecruitTemplateId(@Param("recruitTemplateId") String recruitTemplateId) throws Exception;

	/**
	 * 批量修改状态
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int updateStatusByIds(Map<String, Object> map) throws Exception;

	/**
	 * 查询推荐榜单
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public List<RankingListVO> selectRankingList(Map<String, Object> map) throws Exception;

	/**
	 * 查询推荐榜单
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public List<RankingListVO> selectRankingListByPage(Map<String, Object> map) throws Exception;

	/**
	 * 查询推荐人数
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Integer selectRecommendCount(Map<String, Object> map) throws Exception;


	/**
	 * 查询内荐费用
	 *
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public BigDecimal selectRecommendAmount(Map<String, Object> map) throws Exception;

	/**
	 * 查询大于0的榜单
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<RankingListVO> selectGreaterThanZeroRankingList(Map<String, Object> map) throws Exception;

}
